# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprwayland-scanner
pkgver=0.4.2
pkgrel=0
pkgdesc="Hyprland implementation of wayland-scanner for C++"
url="https://github.com/hyprwm/hyprwayland-scanner"
arch="all"
license="BSD-3-Clause"
source="https://github.com/hyprwm/hyprwayland-scanner/archive/v$pkgver/hyprwayland-scanner-v$pkgver.tar.gz"
makedepends="cmake pugixml-dev"
subpackages="$pkgname-doc"

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}


sha512sums="
1f1b73dbb80052484889a075095d76e0fba83a5c91f80d8e5a6167153405337b011c423250aef3feb9270ea641fe8d68966a17d92057215f54e4d8cc67b24c7e  hyprwayland-scanner-v0.4.2.tar.gz
"
